//
//  CellViewController.m
//  LNA
//
//  Created by dllo on 16/1/18.
//  Copyright © 2016年 www.lanou3g.com蓝鸥. All rights reserved.
//

#import "CellViewController.h"
#import <AFNetworking.h>
#import "RootModel.h"
@interface CellViewController ()
@property (nonatomic, retain) UIWebView *webView;
@property (nonatomic, retain) NSMutableArray *webArr;
@end

@implementation CellViewController
- (void)viewWillAppear:(BOOL)animated
{
    // tabBar显示
    self.tabBarController.tabBar.hidden = YES;
}
// 页面即将消失 将tabBar隐藏
- (void)viewWillDisappear:(BOOL)animated
{
    // tabBar隐藏
    self.tabBarController.tabBar.hidden = NO;
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    self.webView = [[UIWebView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height + 49)];
    
    [self.view addSubview:_webView];
    
    [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:self.str]]];
    
    [_webView release];
    
    
    
    
//    NSString *str = @"http://open.qyer.com/qyer/recommands/trip?client_id=qyer_ios&client_secret=cd254439208ab658ddf9&count=10&lat=38.88251788995828&lon=121.5401180455004&page=1&track_app_channel=App%2520Store&track_app_version=6.8.3&track_device_info=iPhone7%2C2&track_deviceid=0C79B4F1-2C09-4E9A-805E-05836431AB22&track_os=ios%25209.2&type=index&v=1";
//    AFHTTPSessionManager *sessionManager = [AFHTTPSessionManager manager];
//    [sessionManager GET:str parameters:nil progress:^(NSProgress * _Nonnull downloadProgress) {
//        
//        NSLog(@"%lld",downloadProgress.totalUnitCount);
//    } success:^(NSURLSessionDataTask * _Nonnull task, id  _Nullable responseObject) {
//        NSArray *arr = responseObject[@"data"];
////        self.webArr = [RootModel modelHanderWithArrar:arr];
//        for (NSDictionary *dic in arr) {
//            RootModel *m = [[RootModel alloc] init];
//            [m setValuesForKeysWithDictionary:dic];
//            
//            [_webArr addObject:m];
//            
////           [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:m.view_url]]];
//            NSLog(@"%@",m.view_url);
//            
//            
//        }
//        
//  
//        
//        
//        
//    } failure:^(NSURLSessionDataTask * _Nullable task, NSError * _Nonnull error) {
//        NSLog(@"%@",error);
//        
//        
//    }];
//    
//   
//    
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
